#pragma once
#include "DGeometry.h"

namespace Skill
{
	namespace Ode
	{
		ref class DMatrix4;
		ref class DVector3;
		ref class DSpace;

		namespace Geometries
		{			
			ref class DHeightfieldData;

			public ref class DHeightfield : DGeometry
			{			
			protected:
				virtual void CollectManagedMemory() override;
			public:				
				///<summary>
				/// Creates a heightfield geom.
				///
				/// Uses the information in the given DHeightfieldData to construct
				/// a geom representing a heightfield in a collision space.
				///</summary>
				/// <param name = "space"> The space to add the geom to. </param>
				/// <param name = "data"> The DHeightfieldData. </param>
				/// <param name = "placeable"> If true this geom can be transformed in the world using the
				/// usual functions such as SetPosition and SetRotation. If the geom is
				/// not set as placeable, then it uses a fixed orientation where the global y axis
				/// represents the dynamic 'height' of the heightfield. </param>
				DHeightfield(DSpace^ space, DHeightfieldData^ data, bool placeable);

				///<summary>
				/// Gets or set a DHeightfieldData to a heightfield geom.				
				/// Associates the given DHeightfieldData with a heightfield geom.
				/// This is done without affecting the GEOM_PLACEABLE flag.
				///</summary>
				REF_PROP_DECLARATION_GETSET(DHeightfieldData,Data);				
			};
		}
	}
}